<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<%
	String path = request.getContextPath();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改角色</title>
<script src="<%=path %>/js/formValidator-4.1.1.js" type="text/javascript" charset="UTF-8"></script>
<script src="<%=path %>/js/formValidatorRegex.js" type="text/javascript" charset="UTF-8"></script>
<script src="<%=path %>/js/DateTimeMask.js" type="text/javascript" charset="UTF-8"></script>
<script type="text/javascript">
	$(function(){
		$.formValidator.initConfig({theme:"126",submitOnce:true,formID:"rForm",
			onError:function(msg){alert(msg);},
			submitAfterAjaxPrompt : '有数据正在验证,请稍候...'
		});
		$("#roleName").formValidator({
			onShowFixText:"角色名称可随便写,但要见名知意;长度至少为3",
			onFocus:"必须输入角色名称",
			onCorrect:"角色名称输入正确"
			}).inputValidator({
				min:3,onError:"角色名称长度至少为3!"
				});
		$("#status").formValidator({
			onShowFixText:"角色状态一般选择激活!",
			onShow:"请选择角色状态",
			onFocus:"角色状态必须选择",
			onCorrect:"角色状态已选择!"
			}).inputValidator({
				min:1,
				onError: "请选择角色状态!"
				});
	});
</script>
</head>
<body>
	<form id="rForm" action="<%=path%>/role/editRole.htm" method="post">
		<table border="1" style="width: 100%; border-collapse: collapse; border-color: #D4D4D4;" rules="rows">
			<tr>
			  <td width="20%">
			  	<input type="hidden" name="role.RId" value="${role.RId }"></input>
			  </td>
		      <td align="right"><font color="red">* </font>资源名称:</td>
		      <td><input type="text" id="roleName" name="role.roleName" value="${role.roleName }" style="width:350px" /></td>
		      <td><div id="roleNameTip" style="width:280px"></div></td>
		    </tr>
		    <tr>
		    	<td width="20%"></td>
		        <td align="right">&nbsp;</td>
		        <td colspan="2" valign="top"><div id="roleNameFixTip"></div></td>
		    </tr>
		     <tr>
			  <td width="20%"></td>
		      <td align="right"><font color="red">* </font> 资源状态:</td>
		      <td>
					<select id="status" name="role.status">
						<option value="0">--请选择资源状态--</option>
						<option value="1" <c:if test="${role.status eq '1' }">selected</c:if>>激活</option>
						<option value="2" <c:if test="${role.status eq '2' }">selected</c:if>>未激活</option>
					</select>
			 </td>
		      <td><div id="statusTip" style="width:280px"></div></td>
		    </tr>
		    <tr>
		    	<td width="20%"></td>
		        <td align="right">&nbsp;</td>
		        <td colspan="2" valign="top"><div id="statusFixTip"></div></td>
		    </tr>
			<tr>
				<td colspan="2"></td>
				<td style="padding-left: 100px;"><input type="submit" value="提交"></input></td>
			</tr>
		</table>
	</form>
</body>
</html>